void detectEye(IplImage *img)
{
	CvSeq *faces = cvHaarDetectObjects(
		img,
		cascade_f,
		storage,
		1.1, 3, 0
		cvSize(40,40)
	);

	if (faces->total==0) return;
	
	CvRect *face = (CvRect*)cvGetSeqElem(faces, 0);

	cvRectangle(
		img,
		cvPoint(face->x, face->y),
		cvPoint(face->x+face->width, face->y+face->height),
		CV_RGB(255,0,0),
		1, 8, 0
	);

	cvClearMemStorage(storage);

	cvSetImageROI(
		img,
		cvRect(
			face->x,
			face->y +(face->height/5.5),
			face->width,
			face->height/3.0
		)
	);

	CvSeq *eyes = cvHaarDetectObjects(
		img,
		cascade_e,
		storage,
		1, 15, 3, 0,
		cvSize(25,15)
	);

	int i;

	for(i = 0; i < (eyes ? eyes->total : 0); i++){
		CvRect eyes = (CvRect*) cvGetSeqElem(eyes,i);

		cvRectangle(
			img,
			cvPoint(eye->x,eye->y),
			cvPoint(eye->x + eye->width, eye->y + eye->height).
			cvRGB(255,0,0),
			1,8,0
		);
	}
}
